Copiar planilhas do Excel
The code example above shows how to use IronXL to duplicate and copy WorkSheets within and between Excel WorkBooks. Copie e cole planilhas para e de outros livros. Crie planilhas duplicadas dentro do mesmo livro.
The CopySheet method is used to duplicate a worksheet within the same workbook or spreadsheet. O nome da nova planilha é necessário como parâmetro.
Use the CopyTo method to duplicate a sheet to or from another workbook. A WorkBook is required as the first parameter and is followed by the name of the new worksheet.
Você pode baixar um projeto de arquivo deste link.
How to Copy Excel Worksheets in C
- Instale uma biblioteca Excel para copiar planilhas.
- Carregue um livro Excel e crie uma nova folha.
- Use the
CopyTomethod to copy data to the new worksheet. - Salve a nova planilha Excel.

